import java.util.Scanner;

public class test {
    public static void main1(String[] args) {
        double x=0.5;
        System.out.println((int)x);
        if((int)x==x){
            System.out.println("11");
        }
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
//        while (in.hasNext()) { // 注意 while 处理多个 case
//            String str=in.nextLine();
//            double weight=str.charAt(0);
//            char a=str.charAt(1);
//            int sum=0;
//            if((int)weight==weight&&a=='y'){
//                sum=20+(int)weight+5;
//            }else if((int)weight==weight&&a!='y'){
//                sum=20+(int)weight;
//            }else if((int)weight!=weight&&a=='y'){
//                sum=20+(int)weight+5+1;
//            }else if((int)weight!=weight&&a!='y'){
//                sum=20+(int)weight+1;
//            }else if(weight<1.0){
//                sum=20;
//            }else if(weight<1.0&&a=='y'){
//                sum=20+5;
//            }
//            System.out.println(sum);
//        }
//        String a="1.5 y";
//        a.substring(0,a.length()-2);
//        double b=Double.parseDouble(a.substring(0,a.length()-2));
//        System.out.println(b);
//        System.out.println(a.substring(0, a.length() - 2));
        //Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
//        while (in.hasNext()) { // 注意 while 处理多个 case
//            String str=in.nextLine();
//            double weight=Double.parseDouble(str.substring(0,str.length()-2));
//            char a=str.charAt(str.length()-1);
//            int sum=0;
//            if((int)weight==weight&&a=='y'){
//                sum=20+(int)weight+5;
//            }else if((int)weight==weight&&a!='y'){
//                sum=20+(int)weight;
//            }else if((int)weight!=weight&&a=='y'){
//                sum=20+(int)weight+5+1;
//            }else if((int)weight!=weight&&a!='y'){
//                sum=20+(int)weight+1;
//            }else if(weight<1.0){
//                sum=20;
//            }else if(weight<1.0&&a=='y'){
//                sum=20+5;
//            }
//            System.out.println(sum);
    }




//牛牛寄快递
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String str=in.nextLine();
            double a=Double.parseDouble(str.substring(0,str.length()-2));
            char b=str.charAt(str.length()-1);
            int sum = 0;
            if (a <= 1.0) {
                sum = 20;
            }
            if (a > 1.0) {
                sum = 20 + (int)(a );
            }
            if (b == 'y') {
                System.out.println(sum + 5);
            } else {
                System.out.println(sum);
            }

        }
    }
}
